<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>出错啦!!!</title>
	<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
	<script type="text/javascript">

		// function getQueryString(queryName) {
		// 	var reg = new RegExp("(^|&)" + queryName + "=([^&]*)(&|$)", "i");
		// 	var r = window.location.search.substr(1).match(reg);
		// 	if (r != null) {
		// 		return decodeURI(r[2]);
		// 	} else {
		// 		return null;
		// 	}
		// }

		// function showErrorTip() {
		// 	var errorTip = getQueryString('msg');
		// 	if (errorTip != null) {
		// 		document.getElementById('errorTip').innerText = errorTip;
		// 	}
		// }
		function returnPage() {
			// var href = window.location.href
			// location.href('http://rsa.ycztsw.cn/login.html?url=http://css.ycztsw.cn/css2/loginCustomer.htm')

			var href = window.location.href
			let index = href.lastIndexOf("/css2");
			var subBeforeUrl = href.substring(0, index);
			console.log(subBeforeUrl);
			var currentUrl = subBeforeUrl + '/css2/loginout.api'
			console.log(currentUrl);
			// window.location.href = 'http://rsa.ycztsw.cn/login.html?url=http://css.ycztsw.cn/css2/loginCustomer.htm'
			$.ajax({
				type: "get",
				url: currentUrl,
				data: {
					token: '',
					ticket: '',
					sysType: '002',
				},
				success: function (data) {
					console.log(data)
					window.location.href = data.data
					//  var android=data.android;
					//  var ios=data.ios;
					//  document.getElementById('android').href=android.download_url; 
				},
			})
		}
	</script>
</head>

<body>
	<!-- <h1 style="color: red;" id='errorTip'></h1> -->

	<p><img src="./images/error.png" width="520" height="320" /></p>
	<h1>暂无权限登录系统，请联系水司管理员</h1>
	<input class="btn" type="button" value="重新登录" onclick="returnPage()">
	<!-- <button onclick="returnPage()">重新登录</button> -->
	
	<!-- <div onclick="returnPage()" class="button">
		<p>重新登录</p>
	</div> -->


</body>
<style>
	body {
		text-align: center
	}
	.btn {
    width: 150px;
    height: 50px;
    font-size: 16px;
    color: #fff;
    background: #173d3b;
    border-radius: 5px;
    position: absolute;
    /* top: 50px; */
    left: 45%;
   }
	h1 {
		font-family: "微软雅黑"
	}


</style>

</html>